import { Spin } from 'antd'
import c from 'classnames'
import './index.less'

export { default as Suspense } from './Suspense'

export default function Loading(props: {
  tip?: React.ReactNode
  className?: string
  children?: React.ReactNode
}) {
  return <div className={c('qun-loading', props.className)}>
    <Spin className="qun-spin" tip={props.tip ?? '加载中...'}>
      {props.children}
    </Spin>
  </div>
}
